From 341f275a823044242d4df2756cd9995be2a1ce73 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 22 Aug 2006 15:39:25 +0000 Subject: [PATCH] Paul Fox improves stability of sort filter. --- sort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sort.c b/sort.c index 0c14e2c57..b7e579431 100644 --- a/sort.c +++ b/sort.c @@ -55,10 +55,10 @@ sort_comp(const void * a, const void * b) const waypoint *x2 = *(waypoint **)b; switch (sort_mode) { - case sm_gcid: return x1->gc_data.id > x2->gc_data.id; + case sm_gcid: return x1->gc_data.id - x2->gc_data.id; case sm_shortname: return strcmp (x1->shortname, x2->shortname); case sm_description: return strcmp (x1->description, x2->description); - case sm_time: return x1->creation_time > x2->creation_time; + case sm_time: return x1->creation_time - x2->creation_time; default: abort(); return 0; /* Internal caller error. */ } } -- 2.30.2